|
|
@@ -38,7 +38,7 @@ module Agents
|
38
|
38
|
"description": { "path": "results.data[*].description" }
|
39
|
39
|
}
|
40
|
40
|
|
41
|
|
- When parsing text, each sub-hash should contain a `regexp` and `index`. Output text is matched against the regular expression repeatedly from the beginning through to the end, collecting a captured group specified by `index` in each match. Each index should be either an integer or a string name which corresponds to `(?<_name_>...)`. For example, to parse lines of `_word_: _definition_`, the following should work:
|
|
41
|
+ When parsing text, each sub-hash should contain a `regexp` and `index`. Output text is matched against the regular expression repeatedly from the beginning through to the end, collecting a captured group specified by `index` in each match. Each index should be either an integer or a string name which corresponds to <code>(?<<em>name</em>>...)</code>. For example, to parse lines of <code><em>word</em>: <em>definition</em></code>, the following should work:
|
42
|
42
|
|
43
|
43
|
"extract": {
|
44
|
44
|
"word": { "regexp": "^(.+?): (.+)$", index: 1 },
|